MutableRedBlackTreeMap
A MutableSortedMap implementation backed by a Red-Black tree.
Keys are ordered by comparator. By default, keys use their natural ordering. Keys comparing as zero identify the same mapping; replacing its value retains the original key. For interoperability with ordinary maps, the comparator should be consistent with key equality. The comparator must impose a stable total order while keys are in the map; do not mutate keys in ways that change their ordering. Null values are supported, but null keys are not.
firstKey, lastKey and neighbor queries return null when no matching key exists. Iterators traverse in key order and are fail-fast on structural modifications other than their own MutableIterator.remove; value replacements do not invalidate iterators. Iteration takes O(n) time and O(log n) auxiliary space. containsValue takes O(n) time. get, put, remove, containsKey, floor, ceiling, higher, lower, firstKey, and lastKey take O(log n).
Parameters
The ordering used by the tree. Defaults to natural ordering (keys must then implement Comparable); supply a comparator for other key types.
Type Parameters
The type of keys maintained by this map.
The type of mapped values.